-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
add deprecation notice for mapbox traces #4783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @archmoj |
print( | ||
"*choroplethmapbox* trace is deprecated!", | ||
"Please consider switching to the *choroplethmap* trace type and `map` subplots.", | ||
"Learn more at: https://plotly.com/javascript/maplibre-migration/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All links should point to the Python documentation: https://plotly.com/python/mapbox-to-maplibre/
@@ -3,6 +3,11 @@ | |||
|
|||
|
|||
class Choroplethmapbox(_BaseTraceType): | |||
print( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a proper warning rather than print statements
Co-authored-by: Liam Connors <[email protected]>
could we use a warning as mentioned by @ndrezn above #4783 (comment) |
I am not sure is that's a good idea. |
@archmoj Being annoying is the whole point, so that users will change their code before the traces are removed entirely. |
@LiamConnors Could you please test this to see if this produce the desirable warnings? |
@archmoj, I see the deprecation notice on traces and px functions that don't use mapbox
![]() ![]() But not on ones that do: ![]() |
@archmoj Maybe you're already on it but I think the warning needs to go inside the |
@LiamConnors Thanks for catching that. Let's try @emilykl's suggestion. |
@archmoj, I still see the issue ![]() |
@LiamConnors Debugging the bug you noticed wasn't easy. I figured the error is coming from the plotly.py templates which include defaults for "scattermapbox" traces as well as `"mapbox" subplots. |
Closes #4730.